package org.example.Command.Case2;

public class CommandPattern {
    public static void main(String[] args) {

        Stock stock = new Stock();

        SellStock sellStock = new SellStock(stock);
        BusyStock busyStock = new BusyStock(stock);

        //命令执行者
        Broker broker = new Broker();
        //添加执行命令
        broker.takeOrder(sellStock);
        broker.takeOrder(busyStock);
        broker.placeOrders();
    }
}
